package com.tolls;

import java.io.*;

public class IoField {


    public static void main(String[] args) {
        characters();
    }



    private static void characters() {

        try {


//            FileWriter fw = new FileWriter("D:/upload/ioFile.txt",true);
//            fw.write("iiiiii");

         //   fw.flush();
            FileInputStream fr = new FileInputStream("D:/upload/ioFile.txt");

          //  char []  buf = new char[128];
            byte[] byt = new byte[28];
            //将Denmo中的文件读取到buf数组中。
            int num = 0;
            while((num = fr.read(byt))!=-1) {


              //  fr.read()
                fr.read(byt,0,num);
                String str = new String(byt);
                System.out.println(str);


               FileWriter fw = new FileWriter("D:/upload/ios.txt",true);
               fw.write(str);
               fw.flush();

            }
          //  fr.close();
        }
        catch (IOException e) {

        }
    }


}
